import React from 'react'
import { Outlet, useNavigate } from 'react-router-dom'
import { routerlist } from '../../router'
import { TabBar } from 'antd-mobile'
function Index() {
    const navigate = useNavigate()
    return (
        <div >
            <div >
                <Outlet></Outlet>
            </div>
            <div style={{ position: 'fixed', bottom: 0, left: 0, width: '100%' }}>
                <TabBar onChange={(key) => navigate(key)}>
                    {routerlist.map(item => (
                        <TabBar.Item key={item.path} title={item.title} icon={item.icon} />
                    ))}
                </TabBar>
            </div>
        </div>
    )
}

export default Index
